<?php
namespace bee;

define("DISPATCH_ONLY_REGISTERED",          0);
define("DISPATCH_AUTO_OBJECTS",             1);
define("DISPATCH_AUTO_FUNCTIONS",           2);   //moĹľe biti opako jer korisnik preko parametara moĹľe zvati bilo koju fn
define('DISPATCH_AUTO_OBJECTS_FUNCTIONS',   3);
define("BEE_PATH",                          "c:/inetpub/php_web");
define("BEE_VERSION_MAJOR", 0);
define("BEE_VERSION_MINOR", 8);
define("BEE_VERSION_REVISION", 0);
define("DB_ENGINE_MSSQL", 1);
define("DB_ENGINE_MYSQL", 2);
/**
 *
 * @todo oracle not enough tested
 */
define("DB_ENGINE_ORACLE", 4);
define("DB_ENGINE_ODBC", 32768); // trebalo bi ga koristiti samo u kombinacijia sa nekim db engineom
define("DB_ENGINE_MSSQL_ODBC", DB_ENGINE_MSSQL | DB_ENGINE_ODBC);

define("PAGE_TYPE_FORM",         1);
define("PAGE_TYPE_PAGE",         2);
define("PAGE_TYPE_SPECIAL",      3);
define("PAGE_TYPE_SPECIAL_APP", 4);


set_include_path(get_include_path() . PATH_SEPARATOR . BEE_PATH . PATH_SEPARATOR . BEE_PATH . "/lib/ext");
//echo get_include_path();
require_once "lib/bee_autoLoader.php";
require_once "lib/object.php";
require_once "lib/singleton.php";

class config extends singleton
{ static protected $__instance;
  //static protected $_class;

  public $site_status = "WORK IN PROGRESS";
  //public $site_status = "ON AIR";
  //public $site_status = "UNFINISHED"

  public $FOLDER_LIST = array();//"lib", "lib/DAO", "lib/ext");//, 'xls_rpt_class', 'usr_app/DAO', 'usr_app', 'reports');// ovo definirati negdje drugo

  public $sql__USERNAME               = "iis";
  public $sql__PASSWORD               = "TestIis321!";
  public $sql__SERVER                 = "mysql:host=localhost;dbname=millennium"; //beeSqlSrv";  //public $sql__SERVER                 = "odbc:msKerber";//beeSqlSrv";
  public $sql__DB_NAME                = "millennium";

  public $sql_FTP_DB_NAME             = "mysql:host=localhost;dbname=ftp";
  public $sql_FTP_USERNAME            = "apache";
  public $sql_FTP_PASSWORD            = "chepachepa";


  public $FTP_HOME_DIR                = "/home/proftpd";

  public $sys_COOKIE_USERNAME         = 86400;

  public $sys_USE_TRANSACTION         = 1;
  public $sql__DATABASE_TYPE          = DB_ENGINE_MYSQL; //"MSSQL";
  public $PROCESS_PAGES_FIRST         = false;
  public $sys_LOG_FILE_PATH           = "c:/inetpub/php_web";
  public $sys_XSL_PROFILING_DIR       = "";

  public $sys_USE_DB_PROCS            = false;
  public $sys_DISPATCH_LEVEL          = DISPATCH_AUTO_OBJECTS;
  public $sys_BEE_PATH                = BEE_PATH;
  public $sys_APP_PATH;
  public $sys_UPLOAD_DIR;
  public $sys_TEMPLATE_PATH;
  public $sys_USR_APP_PATH;
  public $sys_TMP_PATH;
  public $sys_FOP_PATH;
  public $sys_REPORTS_PATH;
  public $sys_PUBLIC_PATH;

  //public $sys_site_root               = "C:/bit/Apache2/htdocs";
  public $sys_site_name               = "http://devweb.millennium.ba";//"http://188.165.216.150";
  public $sys_LOGOUT_URL              = "index.php?__form=ponuda&__nolad=true";
  public $sys_LOGING2DB               = true;
  public $sys_serverID                = "damirG0gaiva5r";
  public $sys_generate_XML            = true;
  public $sys_IS_DEBUG_MODE           = false;
  public $sys_ENCRYPT_PASS            = true;
  public $sys_START_PAGE              = "start";
  public $sys_START_PAGE_TYPE         = PAGE_TYPE_FORM;
  public $sys_DEFAULT_TEMPLATE        = "main.xsl";
  public $sys_PLUGINS_CLASS           = "plugins";
  public $sys_DOCUMENT_LIBRARY        = "/home/sportiw/documentLibrary";

  public $app_APPLICATION_NAME        = "beeOSdemo";
  public $app_APPLICATION_TITLE       = "Millennium SK";
  public $app_SOAP_USERNAME           = "";
  public $app_SOAP_PASSWORD           = "";
  public $app_SOAP_CAUSE              = "";
  public $app_SOAP_CACHE_TIME         = 86400;

  public $app_BACKDOOR_PASS           = "sportiW159";
  public $app_BACKDOOR_MAIL           = "sportiw.reg@gmail.com";
  //public $app_BACKDOOR_MAIL           = "kbarisic@gmail.com";
  //public $app_BACKDOOR_MAIL           = "damir.zelenika@gmail.com";
  public $app_BACKDOOR_DOMAIN         = "sportiw.com";



  public $app_GRID_STEP               = 2;
  public $app_FFWD_STEP               = 10;
  public $app_PASS_LENGTH             = 6;

  public $sys_time_between_logins     = 3;
  public $sys_MAX_BAD_LOGINS          = 1000;

  public $sys_parse_EQ_BTN            = true;
  public $sys_AUTOLOAD_SHOW_WARNING   = true;
  public $sys_ajax_refresh_time       = 6000;
  //public $sys_sound_debug             = false;
  public $sys_CSS_STYLE               = "xslt/eStil.css";

  protected function __construct()
  { $this->sys_APP_PATH               = BEE_PATH . "";
    $this->sys_TEMPLATE_PATH          = $this->sys_APP_PATH . "/templates";
    $this->sys_USR_APP_PATH           = $this->sys_APP_PATH . "/usr_app";
    $this->sys_TMP_PATH               = $this->sys_APP_PATH . "/tmp";
    $this->sys_FOP_PATH               = $this->sys_TMP_PATH . "/pdf_tmp2";
  	$this->sys_REPORTS_PATH           = $this->sys_APP_PATH . "/reports";
    $this->sys_UPLOAD_DIR             = $this->sys_TMP_PATH .	"/upload";
    $this->sys_PUBLIC_PATH            = "/home/sportiw/web";
    $this->FOLDER_LIST                = array(  $this->sys_BEE_PATH . "/lib",
                                                $this->sys_BEE_PATH . "/lib/DAO",
                                                $this->sys_BEE_PATH . "/lib/ext",
                                                //$this->sys_BEE_PATH . "/lib/ext/Text",
                                                $this->sys_TEMPLATE_PATH,
                                                $this->sys_USR_APP_PATH,
                                                $this->sys_USR_APP_PATH . "/DAO",
//                                              $this->sys_REPORTS_PATH,
                                                $this->sys_USR_APP_PATH . "/webPanes"
        );

    set_include_path(get_include_path() . PATH_SEPARATOR . $this->sys_USR_APP_PATH);

  }

  public $sys_SMS_WSDL 							= "SendSmsPort.wsdl";

//$ldap_SERVER 							= '';
//$ldap_DOMAIN 							= '';

//$sys_pxReceiveUsername 		= '';
//$sys_pxReceivePassword 		= '';
//$app_pxEmlAddress 				= '';

  public $sys_pxSendUsername 			= "";
  public $sys_pxSendPassword 			= "";
  public $app_pxSvcNumber 				= "";

}
